import { createHashRouter ,Navigate } from 'react-router-dom';
import Login from '../views/Login';
import Home from '../views/Home/index'
import LayoutIndex from '../layout/index'
import Home1 from '../views/Home/home1';
import Home11 from '../views/Home/home11';
import Home3 from '../views/Home/home3';
import HomeDetail from '../views/Home/homeDetail'
const routes=[
  {
    path: '/',
    element: <Navigate to="/login" />,
  },
  {
    path:'/login',
    element:<Login />
  },
  {
    path:'/home',
    title: '项目配置',
    element: <LayoutIndex />,
    children: [
      {
        title: '配置详情',
        path: '/home',
        element: <Home />
      },
            {
        path:'/home/homeDetail',
        title:'配置详情',
        element:<HomeDetail />,
         meta: {
		    	title: '配置详情',
		}
      }
    ]
  },
          {
    title:'首页列表',
    element: <LayoutIndex />,
    meta: {
			title: '首页列表',
		},
    children:[
      {
        path:'/homeList',
        title:'首页列表1',
        element:<Home1 />,
         meta: {
			title: '首页列表1',
		},
      },
      {
        path:'/homeList/home11',
        title:'首页列表2',
        element:<Home11 />,
              meta: {
			title: '首页列表222',
		},
    
      },
      {
             path:'/homeList/home3',
        title:'首页列表3',
        element:<Home3 />,
              meta: {
			title: '首页列表3',
		}, 
      },

    ]
  }

]

export const routerList = createHashRouter(routes, {
  future: {
    v7_relativeSplatPath: true,
    v7_fetcherPersist: true,
    v7_normalizeFormMethod: true,
    v7_partialHydration: true,
    v7_skipActionErrorRevalidation: true
  }
});